﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="ProductDetail.aspx.cs" Inherits="ProductDetail" %>
    <%@ Register Src="Module/ucMainNav.ascx" TagName="ucMainNav" TagPrefix="uc1"%>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">

</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <!--  ==========  -->
    <!--  = Breadcrumbs =  -->
    <!--  ==========  -->
    <div class="darker-stripe">
        <div class="container">
            <div class="row">
                <div class="span12">
                    <ul class="breadcrumb">
                        <li><a href="index.html">Trang chủ</a> </li>
                        <li><span class="icon-chevron-right"></span></li>
                        <li><a href="shop.html">Shop</a> </li>
                        <li><span class="icon-chevron-right"></span></li>
                        <li><a href="#">Hàng order</a> </li>
                        <li><span class="icon-chevron-right"></span></li>
                        <li><a href="product.html">Ðồ Nam</a> </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!--  ==========  -->
    <!--  = Main container =  -->
    <!--  ==========  -->
    <div class="container">
        <div class="push-up top-equal blocks-spacer">
            <asp:Repeater ID="rptDetailProduct" runat="server" OnItemDataBound="rptDetailProduct_ItemDataBound"
                OnItemCommand="rptDetailProduct_ItemCommand">
                <ItemTemplate>
                    <!--  ==========  -->
                    <!--  = Product =  -->
                    <!--  ==========  -->
                    <div class="row blocks-spacer">
                        <!--  ==========  -->
                        <!--  = Preview /images =  -->
                        <!--  ==========  -->
                        <div class="span5">
                            <div class="product-preview">
                                <div class="picture">
                                    <asp:Repeater ID="rptLabel" runat="server">
                                        <ItemTemplate>
                                            <div class='<%#Eval("Color") %>'>
                                                <%#Eval("Name") %></div>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                    <a id="fillImage" href="/Images/Product/big/<%#Eval("Image_01") %>" class="add-prettyphoto">
                                        <img src="/Images/Product/big/<%#Eval("Image_01") %>" alt="" width="940" height="940"
                                            id="mainPreviewImg" /></a>
                                </div>
                                <div class="thumbs clearfix">
                                    <div class="thumb active">
                                        <a href="#mainPreviewImg">
                                            <asp:Image ID="img1" ImageUrl='/Images/Product/big/<%#Eval("Image_02") %>' AlternateText="" runat="server" />
                                            </a>
                                    </div>
                                    <div class="thumb">
                                        <a href="#mainPreviewImg">
                                            <asp:Image ID="img2" ImageUrl='/Images/Product/big/<%#Eval("Image_03") %>' AlternateText="" runat="server" />
                                            </a>
                                    </div>
                                    <div class="thumb">
                                        <a href="#mainPreviewImg">
                                            <asp:Image ID="img3" ImageUrl='/Images/Product/big/<%#Eval("Image_04") %>' AlternateText=""  runat="server" />
                                            </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--  ==========  -->
                        <!--  = Title and short desc =  -->
                        <!--  ==========  -->
                        <div class="span7">
                            <div class="product-title">
                                <h1 class="name">
                                    <asp:Repeater ID="rptBrand" runat="server">
                                        <ItemTemplate>
                                            <img class="pd-detail-brand" src='/Images/BrandLogo/<%#Eval("Image").ToString().Trim() %>'
                                                style="width: 68px; height: 40px;" />
                                            <span class="light">
                                                <%#Eval("BrandCateName") %></span>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                    <%#Eval("Name") %></h1>
                                <div class="meta">
                                    <asp:Label ID="lbCostOld" class="tag old-price" Text='<%#Eval("Cost","$ {0:0,0}") %>' runat="server" />
                                    <asp:Label ID="lbCostNew" class="tag" Text='<%#Eval("Cost_Sale","$ {0:0,0}") %>' runat="server" />
                                </div>
                            </div>
                            <div class="product-website clearfix">
                                <label>
                                    Xem trực tiếp sản phẩm trên website chính:</label><span>click<a href='<%#Eval("LinkGoc").ToString().Trim() %>'>
                                        tại dây</a>.</span>
                            </div>
                            <div class="product-description">
                                <p>
                                    Mã sản phẩm:
                                    <asp:Label ID="lbId" Text='<%#Eval("Id").ToString().Trim() %>' runat="server" />
                                </p>
                                <p>
                                    <%#HttpUtility.HtmlDecode(Myfunction.SubString(Eval("Content").ToString(), 100, "..."))%></p>
                                <hr />
                                <div class="promotion-gift">
                                    Ưu đãi khi mua sản phẩm này</div>
                                <p>
                                    <%#Myfunction.SubString(Eval("UuDai").ToString(), 25, "...")%></p>
                                <hr />
                                <!--  ==========  -->
                                <!--  = Add to cart form =  -->
                                <!--  ==========  -->
                                <%--<form action="#" class="form form-inline clearfix" />--%>
                                <div class="numbered" style="width: 100px; float: left; position: relative;">
                                    <asp:TextBox ID="txtQty" MaxLength="2" CssClass="tiny-size" Text="1" runat="server"
                                        AutoPostBack="true" />
                                    <span class="clickable add-one icon-plus-sign-alt" style="position: absolute; font-size: 18px;
                                        left: 45px; line-height: 18px;"></span><span class="clickable remove-one icon-minus-sign-alt"
                                            style="position: absolute; font-size: 18px; top: 20px; bottom: 0px; left: 45px;">
                                        </span>
                                </div>
                                &nbsp; Size: UK &nbsp;
                                <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>--%>
                                        <asp:DropDownList ID="dropSize" CssClass="span2" runat="server" />
                                        <a data-toggle="modal" role="button" href="#shopCartModal">Size Chart</a>
                                        <div class="color-filter-2 cf-inner-product">
                                            <ul class="clearfix">
                                                <li>
                                                    <label>
                                                        Màu sắc:
                                                    </label>
                                                </li>
                                                <%--<asp:DropDownList ID="dropColor" CssClass="span2" runat="server" />--%>
                                                <asp:Repeater ID="rptColor" runat="server">
                                                    <ItemTemplate>
                                                        <li style="position: relative;" class="color-filter-item">
                                                            <img class="cfi" src='/Images/Colour/<%#Eval("Image") %>' alt='<%#Eval("Name") %>' />
                                                            <input type="radio" id="cbColor" class='color' style="float: left; position: absolute;
                                                                display: block; top: -3px; left: 3px;" runat="server" />
                                                        </li>
                                                        <asp:Label ID="idColors" Text='<%#Eval("Id").ToString().Trim() %>' runat="server" Visible="false" />
                                                        <asp:Label ID="nameColors" Text='<%#Eval("Name").ToString().Trim() %>' runat="server" Visible="false" />
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                                <asp:Button ID="btnOneSize" CssClass="btn btn-large bold rounded" Text="ONE SIZE"
                                                    runat="server" />
                                            </ul>
                                        </div>
                                        <!--  = Shop cart =  -->
                                        <div id="shopCartModal" class="modal sizechartModal hide fade" tabindex="-1" role="dialog"
                                            aria-labelledby="sizechartModalLabel" aria-hidden="true">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                                    ×</button>
                                                <h3 id="sizechartLabel">
                                                    <span class="light">Shop</span> cart</h3>
                                            </div>
                                            <div class="modal-body">
                                                <table class="table table-theme table-striped">
                                                    <thead>
                                                        <tr>
                                                            <th>
                                                                Tên sản phẩm
                                                            </th>
                                                            <th>
                                                                Số lượng
                                                            </th>
                                                            <th>
                                                                Màu sắc
                                                            </th>
                                                            <th>
                                                                Size
                                                            </th>
                                                            <th>
                                                                Giá
                                                            </th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <tr>
                                                            <td>
                                                                <asp:Literal ID="ltName" Text='' runat="server" />
                                                            </td>
                                                            <td>
                                                                <div class="numbered" style="width: 100px; float: left; position: relative;">
                                                                    <asp:TextBox ID="TextBox1" MaxLength="2" CssClass="tiny-size" Text="1" runat="server"
                                                                        AutoPostBack="true" />
                                                                    <span class="clickable add-one icon-plus-sign-alt" style="position: absolute; font-size: 18px;
                                                                        left: 45px; line-height: 18px;"></span><span class="clickable remove-one icon-minus-sign-alt"
                                                                            style="position: absolute; font-size: 18px; top: 20px; bottom: 0px; left: 45px;">
                                                                        </span>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="dropColor2" CssClass="span2" Width="80px" runat="server" />
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="dropSize2" CssClass="span2" Width="80px" runat="server" />
                                                            </td>
                                                            <td>
                                                                <asp:Literal ID="ltGia" Text='' runat="server" />
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    <%--</ContentTemplate>
                                </asp:UpdatePanel>--%>
                                <p>
                                    <asp:Button ID="lbtCart" OnClick="lbtCart_Click"  Text="Đặt hàng ngay" class="btn btn-danger pull-left pd-detail-addcart-btn" runat="server">
                                    </asp:Button>
                                    <%--<a href="#shopCartModal" data-toggle="modal" class="btn btn-danger pull-left pd-detail-addcart-btn">
                                        <i class="icon-shopping-cart"></i>&nbsp; Đặt hàng ngay</a></p>--%>
                                <%--<a href="" id="btnCart" class="btn btn-danger pull-left pd-detail-addcart-btn" onclick="updateCart('<%#Eval("Id").ToString()%>',1); return false;" >Đặt hàng</a>--%>
                                    <%--<a id="btnCart" CssClass="btn btn-danger pull-left pd-detail-addcart-btn" data-bpopup="{"transition":"slideDown","speed":850,"easing":"easeOutBack"}" onclick="updateCart('<%#Eval("Id").ToString()%>',1); return false;">Dat hang </a>--%>
                                <%--</form>--%>
                                <hr />
                                <!--  ==========  -->
                                <!--  = Share buttons =  -->
                                <!--  ==========  -->
                                <div class="share-item">                           
                                    Share this item with friends: <a href="#">
                                        <div class="fb-like" data-href='~/<%#Eval("Description") %>' data-layout="standard"
                                            data-action="like" data-show-faces="true" data-share="true">
                                        </div>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--  ==========  -->
                    <!--  = Tabs with more info =  -->
                    <!--  ==========  -->
                    <div class="row">
                        <div class="span12">
                            <ul id="myTab" class="nav nav-tabs">
                                <li class="active"><a href="#tab-1" data-toggle="tab">Nhận xét</a> </li>
                                <li><a href="#tab-2" data-toggle="tab"><asp:Literal ID="fbComment" Text="Về thương hiệu" runat="server" /></a> </li>
                            </ul>
                            <div class="tab-content">
                                <div class="fade in tab-pane active" id="tab-1">
                                    <div id="facebookUrl" class="fb-comments" data-href='<%#Eval("Description") %>'
                                        data-width="1130px" data-numposts="10" data-colorscheme="light" runat="server">
                                    </div>
                                </div>
                                <div class="fade tab-pane" id="tab-2">
                                    <asp:Repeater ID="rptBrands" runat="server">
                                        <ItemTemplate>
                                            <div class="brand-logo">
                                                <img src='/Images/BrandLogo/<%#Eval("Image").ToString().Trim() %>' alt="" /></div>
                                            <h3>
                                                <%#Eval("BrandCateName") %></h3>
                                            <p>
                                                <a target="_blank" href='<%#Eval("Website").ToString().Trim() %>'>
                                                    <%#Eval("Website").ToString().Trim() %></a></p>
                                            <p>
                                                <%#HttpUtility.HtmlDecode(Eval("Content").ToString())%></p>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </div>
                            </div>
                        </div>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
        </div>
    </div>
    <!-- /container -->
    <!--  ==========  -->
    <!--  = Related Products =  -->
    <!--  ==========  -->
    <div class="boxed-area no-bottom" id="productOther" runat="server">
        <div class="container">
            <!--  ==========  -->
            <!--  = Title =  -->
            <!--  ==========  -->
            <div class="row">
                <div class="span12">
                    <div class="main-titles lined">
                        <h2 class="title">
                            <span class="light">Sản phẩm</span> cùng loại</h2>
                    </div>
                </div>
            </div>
            <!--  ==========  -->
            <!--  = Related products =  -->
            <!--  ==========  -->
            <div class="row popup-products">
                <asp:Repeater ID="rptListOther" runat="server" 
                    onitemdatabound="rptListOther_ItemDataBound">
                    <ItemTemplate>
                        <!--  ==========  -->
                        <!--  = Products =  -->
                        <!--  ==========  -->
                        <div class="span3">
                            <div class="product">
                                <div class="product-img">
                                    <div class="picture">
                                        <img src='/Images/Product/big/<%#Eval("Image_01") %>' alt="" width="540" height="374" />
                                        <div class="img-overlay">
                                            <a href='/<%#Myfunction.GenarateUrlProduct("san-pham", Myfunction.toUrlFriendly(Eval("Name").ToString().Trim()),Eval("Id").ToString().Trim()) %>' class="btn more btn-primary">Chi tiết</a> <a href="#" class="btn buy btn-danger">
                                                Mua ngay</a>
                                        </div>
                                    </div>
                                </div>
                                <div class="main-titles no-margin">
                                    <h4 class="title">
                                        <span class="striked"><%# (((String)Eval("Cost_Sale").ToString()) != "" ? Eval("Cost", "$ {0:0,0}").ToString() : "")%></span> 
                                        <span class="red-clr"><%# (((String)Eval("Cost_Sale").ToString()) != "" ? Eval("Cost_Sale", "$ {0:0,0}").ToString() : Eval("Cost", "$ {0:0,0}").ToString())%></span>
                                    </h4>
                                    <h5 class="no-margin"><%#Eval("Name") %></h5>
                                </div>
                                <p class="desc">
                                    <%#HttpUtility.HtmlDecode(Myfunction.SubString(Eval("Content").ToString(), 20, "..."))%></p>
                                <p class="center-align product-size"><span class="product-size-title">Size:</span>
                                <asp:Repeater ID="rptSizeBuy" runat="server">
                                    <ItemTemplate>
                                        <asp:Label ID="lbSizeBuy" Text='<%#Eval("Name") %>' runat="server" />
                                    </ItemTemplate>
                                </asp:Repeater>
                                </p>
                            </div>
                        </div>
                        <!-- /product -->
                    </ItemTemplate>
                </asp:Repeater>
            </div>
        </div>
    </div>
    <asp:Literal ID="ltThongBao" runat="server" />
</asp:Content>
